package com.example.audiostreaming.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

/**
 * 片段父类
 */
public abstract class BaseFragment extends Fragment {
    private View mRootView;//根视图

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mRootView = onSubViewLoaded(inflater, container);
        return mRootView;
    }

    //子视图加载
    protected abstract View onSubViewLoaded(LayoutInflater layoutInflater, ViewGroup container);
}
